;
(function() {
	function _can_sale_virtual_goods() {
		return this.getPerm().can_sale_virtual_goods;
	};

	function _can_only_online_pay() {
		return this.getPerm().can_only_online_pay;
	};

	function _common_error_1 () {
		console.error("商家没有开通虚拟商品销售权限，无法获取相关属性");
		return false;
	}
	function _common_error_2 () {
		console.error("商家没有开通禁止货到付款权限，无法获取相关属性");
		return false;
	}
	var skill = {
		//获取商品可否虚拟交易
		getGoodsVirtual: function(goods) {
			return goods.is_virtual;
		}.perm(_can_sale_virtual_goods, _common_error_1),
		getGoodsVirtualById: function(goods_id) {
			var goods = this._getGoods(goods_id);
			return goods.is_virtual;
		}.perm(_can_sale_virtual_goods, _common_error_1),
		//获取商品是否只允许在线支付
		getGoodsOnlyOlinePayById:function (goods_id) {
			var goods = this._getGoods(goods_id);
			return goods.only_online_pay;
		}.perm(_can_only_online_pay, _common_error_2),
		getGoodsOnlyOlinePay:function (goods) {
			return goods.only_online_pay;
		}.perm(_can_only_online_pay, _common_error_2)
	};
	module.exports = skill;
	var db = require("../db/index");
	var DomainCon = require("../domain/_con");
	var GoodsCon = require("../goods/_con");
	var UserCon = require("../../core/user/_con");
	var BusCon = require("../../core/bus/_con");
	var AchCon = require("../ach/_con");
	var ClassifyCon = require("../bus.classify/_con");
	var TagCon = require("../bus.tag/_con");
	var LeagueCon = require("../league/_con");
	var BuffCon = require("../buff/_con");
	var BusUserBindCon = require("../bus_user_bind/_con");
	var BusGuideCon = require("../bus.guide/_con");
	var CommentCon = require("../comment/_con");
	var config = require("../_include/config");
	var data_cut = require("../_include/data_cut");
	var helper = require("../_include/helper");
	var md5 = require("../_include/md5");
	var $Object = require("../_include/$.Object");
	var $Array = require("../_include/$.Array");
	var tld = require('tldjs');
	var fs = require("fs");
	var Fiber = require('fibers');
}());